<%@page contentType="text/html; charset=utf-8"%>
var baseSettingId=null;
function openSendDoc(){
		var url =PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initSendDocAdd";
		top.windowOpen(url,"sendDoc","入伙发放资料登记",300,550);
}
function editSendDoc(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByModify}");
			return false;
		}else{
			var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initSendDocEdit&id="+baseSettingId;
			top.windowOpen(url,"sendDoc","修改入伙发放资料",300,550);
		}
}
function showSendDoc(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByDelete}");
		}
		else{
			AlarmConfirm('${key.tipsByDeleteConfirm}',"main","deleteSendDoc");
		}
}
function deleteSendDoc(){
		var str = "id="+baseSettingId;
		var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=deleteSendDoc"
		var myAjax = new Ajax.Request(url,
                   {method: 'post', parameters: str, onComplete: showSendDocResponse});
}

function showSendDocResponse(response){
	 ajaxSubmitException(response.responseText);
     if('true' == response.responseText){
		      reloadSendDocList();
   	 }else{
   	 	FailureAlert('${key.doFalse}');
   	}
}
function showDeclareTypeResponse(response){
	  ajaxSubmitException(response.responseText);
     if('true' == response.responseText){
		      reloadDeclareTypeList();
   	 }else{
   	 	FailureAlert('${key.doFalse}');
   	}
}
function showContractorResponse(response){
	 ajaxSubmitException(response.responseText);
     if('true' == response.responseText){
		      reloadContractorList();
   	 }else{
   	 	FailureAlert('${key.doFalse}');
   	}
}
function openDeclareType(){
		var url =PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initDeclareTypeAdd";
		top.windowOpen(url,"sendDoc","新增申报类型项目",300,550);
}
function editDeclareType(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByModify}");
			return false;
		}else{
			var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initDeclareTypeEdit&id="+baseSettingId;
			top.windowOpen(url,"sendDoc","修改申报类型项目",300,550);
		}
}
function showDeclareType(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByDelete}");
		}
		else{
			AlarmConfirm('${key.tipsByDeleteConfirm}',"main","deleteDeclareType");
		}
}
function deleteDeclareType(){
		var str = "id="+baseSettingId;
		var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=deleteDeclareType"
		var myAjax = new Ajax.Request(url,
                   {method: 'post', parameters: str, onComplete: showDeclareTypeResponse});
}
function openContractor(){
		var url =PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initContractorConfigAdd";
		top.windowOpen(url,"sendDoc","承包商登记",350,550);
}
function editContractor(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByModify}");
			return false;
		}else{
			var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=initContractorConfigEdit&id="+baseSettingId;
			top.windowOpen(url,"sendDoc","承包商登记",350,550);
		}
}
function showContractor(){
		if(baseSettingId == null){
			ErrorAlert("${key.tipsByDelete}");
		}
		else{
			AlarmConfirm('${key.tipsByDeleteConfirm}',"main","deleteContractor");
		}
}
function deleteContractor(){
		var str = "id="+baseSettingId;
		var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=deleteContractorConfig"
		var myAjax = new Ajax.Request(url,
                   {method: 'post', parameters: str, onComplete: showContractorResponse});
}
/****by黄腾飞****/
/**
 * 缺失资料添加
 */
function showMissingInformationConfigAdd(){
	var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=missingInformationEditPage";;
	top.windowOpen(url,"missingInformationEdit","资料缺失登记",280,550);
}

/**
 * 缴费设置添加
 *
 * @return null
 */
function showChargeAdd(){
	var url = PROJECT_NAME_PATH_MYCE+"/system_occupationConfigAction.do?method=chargeEditPage";;
	top.windowOpen(url,"chargeEdit","资料缺失登记",400,550);
}


